import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import 'amfe-flexible/index.js'
import Highlight from './assets/js/highlight'
import FS from './assets/js/fsConstants'
Vue.use(Highlight)
Vue.config.productionTip = false
import animate from 'animate.css'
Vue.use(animate);
import preview from "vue-photo-preview";
import "vue-photo-preview/dist/skin.css";
const previewOption = {
  maxSpreadZoom: 4, // 预览图最大的倍数，默认是2倍
  fullscreenEl: true, //是否显示右上角全屏按钮
  closeEl: false, //是否显示右上角关闭按钮
  tapToClose: true, //点击滑动区域应关闭图库
  shareEl: false, //是否显示分享按钮
  zoomEl: true, //是否显示放大缩小按钮
  counterEl: true, //是否显示左上角图片数量按钮
  arrowEl: true,  // 左右切换箭头（pc浏览器模拟手机时）
  tapToToggleControls: false, //点击应切换控件的可见性
  clickToCloseNonZoomable: false //点击图片应关闭图库，仅当图像小于视口的大小时
}
Vue.use(preview,previewOption);
Vue.prototype.$FS = FS

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  if (to.meta.title) {
    document.title = to.meta.title
  }
  next()
})
